package com.xy.blog.core.dao;

import com.xy.blog.core.exception.BaseException;
import com.xy.blog.core.springmvc.result.page.PageReq;
import com.xy.blog.core.springmvc.result.page.PageResp;

import java.util.List;

/**
 * @author zanhonglei
 * @version V1.0
 * @Description:
 * @date 2020/3/7
 */
public interface IBaseCommonDao<DO,QUERY> extends IBaseDao<DO> {

    /**
     * 分页查询
     * @param req
     * @return
     */
    PageResp<DO> listByPage(PageReq<QUERY> req) throws BaseException;

    /**
     * 查询
     * @param item
     * @return
     */
    List<DO> select(DO item);

    /**
     *  查询数量
     * @param item
     * @return
     */
    int selectCount(DO item);

}
